/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package matching;

import matching.triple.Triple;
import ontology.Ontology;
import org.jdom.Element;

/**
 *
 * @author livia
 */
public abstract class Match {

  
    public Triple source;
    public Triple target;
    public Ontology ontoSrc;
    public Ontology ontoTgt;

    public Triple getSource(){
        return source;
    }

    public Triple getTarget(){
        return target;
    }

    public boolean equals(Match m){
        return source.equals(m.source)&&
               target.equals(m.target);
    }
   
    @Override
    public String toString(){
	return "[source:"+source+" "+"target:"+target+"]";
    }

    public String[] toArray(){
        String[] ret = new String[6];
        String[] s = source.toArray();
        String[] t = target.toArray();
        System.arraycopy(s, 0, ret, 0, s.length);
        System.arraycopy(t, 0, ret, 3, t.length);
        return ret;
    }

    public abstract Element toElementXML();
}
